
using System;

namespace cachier
{


	public class Display
	{
		Machine controller;
		static Display instance;
		
		public Display ()
		{
		}
		
		
		
		public void setMachine(Machine controller) 
		{
			this.controller = controller;
		}
		
		public void open() 
		{
			Console.WriteLine("[Display] started");
			
			while(true) 
			{	
				Console.Write("$: ");
				String Line = Console.ReadLine();
				
				if (Line != null && Line.Equals("exit")) {
					controller.HandleCommand(Line);
					break;
				}
				else controller.HandleCommand(Line);
			}
		}
		
		public void Out(string message) {
			Console.WriteLine(message);
		}
	}
}
